<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src = "./jquery-1.6.2.min.js"></script>

</head>
<body>
    <div class = "a">
        <input type = "text">

    </div>
    <script>
        $("input").blur(function(){
            if(!$('input').val())
        {
            $(".a").append("<span>请输入内容</span>");
        }
        });
        $("input").focus(function()
    {
        $(".a>span").remove();
    });
    </script>
</body>
</html>